package chapter05.h5_2;

public class Triple {
    private int id;
    private static Triple[] triples = new Triple[]{ new Triple(0), new Triple(1), new Triple(2) };

    private Triple(int id) {
        this.id = id;
    }

    public static Triple getInstance(int id) {
        return triples[id];
    }

    public int getId() {
        return id;
    }
}
